<template>
  <div id="exchange">
    <div class="exchangeBgc">
      <h2>兑换记录</h2>
    </div>
    <div class="exchange-list">
      <table>
        <tr>
          <th>兑换时间</th>
          <th>兑换套餐</th>
          <th>使用兑换码</th>
        </tr>
        <tr v-for="tableList in tableLists">
          <td>{{tableList.changeTime}}</td>
          <td>{{tableList.changeName}}</td>
          <td>{{tableList.changeCode}}</td>
        </tr>
      </table>

    </div>
    <div class="footer">
      <footer-one></footer-one>
    </div>
  </div>
</template>
<script>
  import FooterOne from '../../components/firmware/footer.vue'
  export default{
    name:'exchange',
    data(){
      return{
        screenHeight: window.screen.height-150,
        tableLists:[
          {
            changeTime:'2016-06-18',
            changeName:'高级共享',
            changeCode:'12345678958888'
          },
          {
            changeTime:'2017-01-18',
            changeName:'极速共享',
            changeCode:'1234567895777'
          },
          {
            changeTime:'2017-06-18',
            changeName:'普通共享',
            changeCode:'12345678959999'
          }
        ]
      }
    },
    //注册组件
    components:{FooterOne},
    //实例加载完执行函数
    mounted(){
      //设置模块高度
      document.getElementById('exchange').style.height=this.screenHeight+"px";//页面初始化
    },
    //监听
    watch:{
      screenHeight (val) {
        this.screenHeight = val
        document.getElementById('exchange').style.height = this.screenHeight -150 + "px";//检测窗口的大小，并赋值
      },
    }
  }
</script>
<style scoped>
  #exchange{
    width: 100%;
    margin: auto;
  }
  .exchangeBgc{
    background: url("../../assets/bg_background.png") no-repeat;
    background-size:100% 100%;
    -moz-background-size:100% 100%;
    display: table;
    height: 30%;
    margin: auto;
    width: 100%;
  }
  .exchangeBgc h2{
    display: table-cell;
    vertical-align: middle;
    color: #ffffff;
    font-size: 2.0rem;
    font-weight: 100;
    letter-spacing:2px;
  }
  .footer{
    position: fixed;
    left: 0;
    right: 0;
    bottom:0;
    min-width: 1200px;
  }
  .exchange-list{
    margin: auto;
    padding-top: 7rem;
  }
  .exchange-list table{
    margin: auto;
    text-align: left;
  }
  .exchange-list table tr{

  }
  .exchange-list table tr th{
    padding: 15px 80px;

  }
  .exchange-list table tr td{
    padding: 15px 80px;
  }

</style>
